<%= error_messages_for 'article' %>
<% @style = has_excerpt? ? "" : "display:none" %>
<!-- begin required fields -->
<div class="group">
  <dl>
    <dt><label for="article_title"><%= _('Title') %></label></dt>
    <dd><%= form.text_field :title, :class => 'big'  %></dd>
    <dt id="x-lbl" style="<%= @style %>"><%= form.label_for :excerpt, :text => _('Excerpt') %> <span class="hint">(<%= link_to_function _('Cancel'), %(['x-lbl', 'x-body'].each(Element.toggle)) %>)</span></dt>
    <dd id="x-body" style="<%= @style %>"><%= form.text_area :excerpt, :rows => '8', :class => 'fat'  %></dd>
    <dt><label for="article_body"><%= _('Write your article') %></label> <span class="hint">(<%= link_to_function _('Add an excerpt'), %(['x-lbl', 'x-body'].each(Element.toggle)) %>)</span></dt>
    <dd><%= form.text_area :body, :class => 'fat', :rows => 25  %></dd>
    <dt><label for="article_tag"><%= _('Tags') %></label> <span class="hint"><%= _('Enter one or more tags separated by a comma.') %></span></dt>
    <dd><%= form.text_field :tag %></dd>
  </dl>
</div>
<!-- /end required fields -->

<!-- begin optional fields -->
<dl id="article-optional">
  <dt><label for="article-draft"><%= _('Save as Draft?') %></label></dt>
  <dd><label><%= check_box_tag :draft, '1', !@article.new_record? && !@published, :id => 'article-draft' %><%= _('Yes, save this article as a draft.') %></label></dd>
  <dt id="publish-date-lbl"<%= %( style="display:none") unless @article.new_record? || @published -%>><%= label_tag _('article_created_at'), _('Publish on this date:') %></dt>
  <dd id="publish-date"<%= %( style="display:none") unless @article.new_record? || @published -%>>
    <%= form.datetime_select :published_at, 
          :start_year => (@article.published_at || Time.now.utc).year-1, :discard_year => true, :order => [:month, :day, :year] %>
  </dd>
</dl>
<!-- /end optional fields -->
